#include <stdio.h>
#include <string.h>

int main() {
    char str[100] = "apple";
    int left = 0, right = strlen(str) - 1;
    char temp;
    // 双指针交换字符
    while (left < right) {
        temp = str[left];
        str[left] = str[right];
        str[right] = temp;
        left++;
        right--;
    }
    printf("逆转后的字符串：%s\n", str);
    return 0;
}